# -*- coding: utf-8 -*-
import json, time, hashlib, base64, os

user_item = {}
user_item['user_name'] = '爱语首席水电工'
user_item['user_pass'] = hashlib.md5('%s:%s' % ('xxoo', 'buffalo&paul@2012')).hexdigest()
user_item['sex'] = 1
user_item['birth_year'] = 1983
register_string = '%s:%s:%u:%u' % (user_item['user_name'], user_item['user_pass'], user_item['sex'], user_item['birth_year'],)
print register_string
string_base64 = base64.standard_b64encode(register_string)
print string_base64
string_base64 = base64.standard_b64encode('%s:%s' % (user_item['user_name'], user_item['user_pass'],))
print string_base64
